package ifSwitchPlugins;

public class BasicIf {
	{
		System.out.println("Initialization block");
	}
	
	public void chainedIf(int x, int y){
		if ( x == 1 )
			System.out.println("one");
		else if ( x > 1 ) {
			y = x*2;
			System.out.println("many");
		} else {
			y = -x;
			System.out.println("negative");
		}
	}

	public static void main(String[] args) {

		int testscore = 76;
		char grade;
		if (testscore >= 90) {
			grade = 'A';
		} else if (testscore >= 80) {
			grade = 'B';
		} else if (testscore >= 70) {
			grade = 'C';
		} else if (testscore >= 60) {
			grade = 'D';
		} else {
			grade = 'F';
		}
		System.out.println("Grade = " + grade);
	}
}